package demo.genericity;

/**
 * 一个元组类库
 *
 * @author sun.ye
 * @since 2020-07-05 09:54
 */
public class TwoTuple<A, B> {

    /**
     * final字段提供了private的安全性
     */
    public final A first;
    public final B second;

    public TwoTuple(A first, B second) {
        this.first = first;
        this.second = second;
    }

    @Override
    public String toString() {
        return first + "," + second;
    }
}